home *** CD-ROM | disk | FTP | other *** search
- Path: chronicle.mti.sgi.com!austern
- From: cbarber@bbn.com (Christopher Barber)
- Newsgroups: comp.std.c++
- Subject: Re: standardizing routines without main()
- Date: 15 Feb 1996 13:32:15 PST
- Organization: BBN
- Approved: austern@isolde.mti.sgi.com
- Message-ID: <CBARBER.96Feb15151343@figaro.bbn.com>
- References: <4fvmd1$bh1@syn.cs.cornell.edu>
- NNTP-Posting-Host: isolde.mti.sgi.com
- X-Original-Date: 15 Feb 1996 20:13:43 GMT
- In-Reply-To: vavasis@CS.Cornell.EDU's message of 15 Feb 1996 09:20:36 PST
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBVAwUBMSOmdEy4NqrwXLNJAQFHSAH/dRjbQlSEkxWzcBai2cqF9oT1NmqNJM21
- AMucZEoJ/FPkIJ2e+voKaQQa3xdwpPv4zZrmyqVNEVddQWa9xm+P9g==
- =Lpai
- Originator: austern@isolde.mti.sgi.com
-
- >>>>> "SV" == Stephen Vavasis <vavasis@CS.Cornell.EDU> writes:
-
- SV> I would like to write a subroutine in C++ that gets called
- SV> by an existing program. The subroutine might get loaded with a
- SV> dynamic loader into an already compiled program to which I, the C++
- SV> programmer, have no access.
-
- SV> In this case, there is no C++ main(). Nonetheless, I would still
- SV> like to use C++ features like global static data items whose
- SV> constructors and destructors get called.
-
- You can still use global static data. The constructors will be called
- the first time the shared object is loaded. Of course, you need to have
- a compiler that will support building shared objects.
-
- - Chris
-
-
- --
- Christopher Barber ----- Software Engineer ---- BBN Systems and Technologies
- ---
- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
- Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is
- in http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
-